export const columns = [
  { prop: 'id', label: 'ID', width: 80 },
  { prop: 'name', label: '名称', width: 200 },
  { prop: 'categoryName', label: '分类', width: 200 },
  { prop: 'status', label: '状态', width: 100 },
  { prop: 'cover', label: '封面', width: 100, type: 'image'},
  { prop: 'description', label: '描述' },
  { label: '操作', width: 200, slot: 'action', fixed: 'right' }
]

export const categoryColumns = [
  { prop: 'id', label: 'ID', width: 80 },
  { prop: 'name', label: '名称', width: 100, editable: true },
  { prop: 'description', label: '描述', editable: true }
  // { label: '操作', width: 200, slot: 'action', fixed: 'right' }
]

export const formConfig = [
  {
    label: '相册名称',
    prop: 'name',
    span: 24,
    rules: [{ required: true, message: '请输入相册名称' }]
  },
  // {
  //   label: '相册封面',
  //   prop: 'cover',
  //   span: 24,
  // },
  {
    label: '相册描述',
    prop: 'description',
    span: 24,
    type: 'textarea',
    attrs: {
      type: 'textarea',
      rows: 4,
      placeholder: '请输入相册描述'
    }
  },
  {
    label: '相册分类',
    prop: 'categoryId',
    span: 24,
    type: 'select'
    // rules: [{ required: true, message: '请选择相册分类' }]
  },
  {
    label: '状态',
    prop: 'status',
    span: 24,
    type: 'dict-radio',
    attrs: {
      code: 'album_status'
    }
    // rules: [{ required: true, message: '请选择状态' }]
  }
  // {
  //   label: '照片',
  //   prop: 'files',
  //   span: 24,
  //   type: 'upload',
  //   attrs: {
  //     // limit: 1,
  //     accept: 'image/*',
  //     maxSize: 5 * 1024 * 1024, // 限制为5MB
  //     multiple: true,
  //     showFileList: true,
  //     tips: '请上传照片，支持多张上传，格式为jpg、png、gif'
  //     // action: '/album/upload', // 假设这是上传接口
  //   }
  // }
]
